﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
using System.Text;

namespace QT.Drawing
{
    public class Graphics
    {
   //     //数据/月份

   //public ArrayList arrData=new ArrayList();

   //public ArrayList arrMonth=new ArrayList();

   ////定义幕布高宽

   //private static int iCanvasWidth=400;

   //private static int iCanvasHeight=300;

   ////x轴的间距

   //private int iX=30;

   ////y轴间距

   //private int iY=15;

   //public void InitArray()

   //{

   // for(int i=0;i<6;i++)

   //  arrMonth.Add(i+1);

   //          arrData.Add(200);

   // arrData.Add(180);

   // arrData.Add(285);

   // arrData.Add(290);

   // arrData.Add(275);

   // arrData.Add(350);

   //}

   // //pen 画线

   // Pen myPen = new Pen(Color.Black);

   // Graphics g = CreateGraphics();

   // g.DrawEllipse(myPen, 20, 30, 10, 50);



   // Graphics g1 = this.CreateGraphics();

   // SolidBrush myBrush = new SolidBrush(Color.Red);

   // g1.FillEllipse(myBrush,20,30,40,40);

   // g1.FillRectangle(myBrush,70,70,10,30);

   // //test//this.InitArray();

   // Bitmap bitmap= new Bitmap(iCanvasWidth, iCanvasHeight,PixelFormat.Format24bppRgb);

   // Graphics g=Graphics.FromImage(bitmap);

   // Graphics g=this.CreateGraphics();

   // g.Clear(Color.White);

   

   // Font font = new Font("MS UI Gothic",12);

   // SolidBrush brush = new SolidBrush(Color.Black);

   // Pen pen = new Pen(Color.Black);

   // pen.EndCap = LineCap.ArrowAnchor;

   // pen.DashStyle = DashStyle.Solid;

   // //坐标轴

   //          g.DrawLine(pen,20,220,420,220);

   // g.DrawLine(pen,20,220,20,20);

   // //x轴标格

   // g.DrawLine(Pens.Black,20+iX*1,220,20+iX*1,220-2);

   // g.DrawLine(Pens.Black,20+iX*2,220,20+iX*2,220-2);

   // g.DrawLine(Pens.Black,20+iX*3,220,20+iX*3,220-2);

   // g.DrawLine(Pens.Black,20+iX*4,220,20+iX*4,220-2);

   // g.DrawLine(Pens.Black,20+iX*5,220,20+iX*5,220-2);

   // g.DrawLine(Pens.Black,20+iX*6,220,20+iX*6,220-2);

   // //y轴标格

   // g.DrawLine(Pens.Black, 20, 220 - iY*1, 20 + 2, 220 - iY*1);

   // g.DrawLine(Pens.Black, 20, 220 - iY*2, 20 + 2, 220 - iY*2);

   // g.DrawLine(Pens.Black, 20, 220 - iY*3, 20 + 2, 220 - iY*3);

   // g.DrawLine(Pens.Black, 20, 220 - iY*4, 20 + 2, 220 - iY*4);

   // g.DrawLine(Pens.Black, 20, 220 - iY*5, 20 + 2, 220 - iY*5);

   // g.DrawLine(Pens.Black, 20, 220 - iY*6, 20 + 2, 220 - iY*6);

   // //

   // double dblX1=20;

   // double dblY1=220;

   // for(int i=0;i<arrData.Count;i++)

   // {

   //  double dblData=Convert.ToDouble(arrData[i]);

   //  double dblY2=220-dblData*15/200;

    

   //  double dblX2=20+iX*Convert.ToInt32(arrMonth[i]);

   //  if(i!=0)

   //  {

   //   if(i<arrData.Count-1)

   //   {

   //    g.DrawLine(Pens.Black,float.Parse(dblX1.ToString()),float.Parse(dblY1.ToString()),float.Parse(dblX2.ToString()),float.Parse(dblY2.ToString()));

   //   }

   //   else

   //   {

   //    g.DrawLine(pen,float.Parse(dblX1.ToString()),float.Parse(dblY1.ToString()),float.Parse(dblX2.ToString()),float.Parse(dblY2.ToString()));

   //   }

   //  }

    

   //  dblX1=dblX2;

   //  dblY1=dblY2;

    //}

   }
}
